package com.thrd.taiexhibition.presener;

import com.thrd.taiexhibition.bean.BeanCityIndustryDetail;
import com.thrd.taiexhibition.callback.MvpCallback;
import com.thrd.taiexhibition.model.FocusIndustryImageModel;
import com.thrd.taiexhibition.view.CityFocusIndustryImage;

import java.util.List;

/**
 * @author: ${唐杰}
 * @date: 2021/3/26
 */
public class CityFocusIndustryImagePresener {
    private FocusIndustryImageModel mFocusIndustryImageModel;
    private CityFocusIndustryImage mCityFocusIndustryImage;

    public CityFocusIndustryImagePresener(CityFocusIndustryImage mCityFocusView){
        this.mCityFocusIndustryImage=mCityFocusView;
        this.mFocusIndustryImageModel=new FocusIndustryImageModel();
    }

    public void getCityFocusData(long cityId){
        mFocusIndustryImageModel.getFocusIndustryImage(cityId+"", new MvpCallback<List<BeanCityIndustryDetail>>() {
            @Override
            public void onSuccess(List<BeanCityIndustryDetail> beanHotActivityList) {
                mCityFocusIndustryImage.onSuccess(beanHotActivityList);
            }

            @Override
            public void onFailed(String e, int code) {
                mCityFocusIndustryImage.onError(e,code);
            }
        });
    }

}
